<?php
$page = Yii::app()->getRequest()->getParam('Milestone_page') ? Yii::app()->getRequest()->getParam('Milestone_page') : 1;$this->breadcrumbs=array(
    Yii::t('site','Milestones')=>array('admin','Milestone_page'=>$page),
    $model->recordName,
    Yii::t('site','View'),
);

$this->menu=array(
    array('label'=>Yii::t('site','Item'),'items'=>array(
        array('label'=>Yii::t('site','Update Milestone'), 'url'=>array('update', 'id'=>$model->id,'Milestone_page'=>$page)),
        array('label'=>Yii::t('site','Delete Milestone'), 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id,'Milestone_page'=>$page),'confirm'=>'Are you sure you want to delete this item?')),
    )),
    array('label'=>Yii::t('site','Reports'),'items'=>array(
        array('label'=>Yii::t('site','Status/Priorities'), 'url'=>array('crosstab', 'type'=>'status/priorities','milestoneId'=>$model->id)),
    )),
    array('label'=>Yii::t('site','All Items'),'items'=>array(
        array('label'=>Yii::t('site','Create New Milestone'), 'url'=>array('create','Milestone_page'=>$page)),
        array('label'=>Yii::t('site','Manage Milestones'), 'url'=>array('admin','Milestone_page'=>$page)),
    )),
);
?>

<h1><?php echo Yii::t('site','View Milestone <em>{recordName}</em>',array('{recordName}'=>$model->recordName)); ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
    'data'=>$model,
    'attributes'=>array(
        'id',
        array(
            'name'=>'projectId',
            'type'=>'raw',
            'value'=>CHtml::link($model->project->recordName,array('/project/view','id'=>$model->projectId)),
        ),
        'name',
        'description',
        'dueDate',
        array(
            'name'=>'isReleased',
            'type'=>'raw',
        ),
        array(
            'name'=>'isDepreciated',
            'type'=>'raw',
        ),
        array(
            'label'=>Yii::t('site','Issues'),
            'type'=>'raw',
            'value'=>CHtml::link($model->issuesCount,array('/issue/admin','Issue[milestoneId]'=>$model->id)),
        ),
    ),
)); ?>
